package model

// 商品添加购物车
func CreateCart(userId, goodsId, number int, price float64) (cart Cart, err error) {

	cart = Cart{
		UserId:  userId,
		GoodsId: goodsId,
		Number:  number,
		Price:   price,
		Status:  1,
	}
	err = db.Create(&cart).Error
	return
}
